﻿using CommonServiceLocator;
using GalaSoft.MvvmLight.Ioc;
using Jn698._45GWTool.Controls.RecordChoiceControls;
using Jn698._45GWTool.Models.DataGrid;

using Jn698._45GWTool.ViewModels;
using Jn698._45GWTool.ViewModels.Controls;
using Jn698._45GWTool.ViewModels.Controls.DataControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFirst.Entities;

namespace Jn698._45GWTool.Common
{
    public class ViewModelLocator
    {
        public ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
            SimpleIoc.Default.Register<MainViewModel>();
            SimpleIoc.Default.Register<CommViewModel>();
            SimpleIoc.Default.Register<ModeBitViewModel>();
            SimpleIoc.Default.Register<AppControlViewModel>();
            SimpleIoc.Default.Register<CONNECTControlViewModel>();
            SimpleIoc.Default.Register<CommonControlViewModel>();
            SimpleIoc.Default.Register<FrameMessageInfoViewModel>();
            SimpleIoc.Default.Register<FrameShowViewModel>();
            SimpleIoc.Default.Register<RecordChoiceViewModel>();
            SimpleIoc.Default.Register<ReadRecordViewModel>();
            SimpleIoc.Default.Register<RSDViewModel>();
            SimpleIoc.Default.Register<ROADViewModel>();
            SimpleIoc.Default.Register<ProxyTransmitViewModel>();
            SimpleIoc.Default.Register<ProxyTransmitCommViewModel>();
            SimpleIoc.Default.Register<PlanSetViewModel>();
            SimpleIoc.Default.Register<AddCollectArViewModel>();
            SimpleIoc.Default.Register<AddCollectArExtendViewModel>();
            SimpleIoc.Default.Register<AddBatchConnectArViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateJobViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateConnectPlanViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateEventViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateTransPlanViewModel>();
            SimpleIoc.Default.Register<MeterListViewModel>();
            SimpleIoc.Default.Register<PlanContentViewModel>();
            SimpleIoc.Default.Register<PowerCtrlParamViewModel>();
            SimpleIoc.Default.Register<PortConfigViewModel>();
            SimpleIoc.Default.Register<StepPriceViewModel>();
            SimpleIoc.Default.Register<DayRateTotalViewModel>();
            SimpleIoc.Default.Register<EditPlanListViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateReportViewModel>();
            SimpleIoc.Default.Register<MSDataModel>();
            SimpleIoc.Default.Register<TeminalParamterViewModel>();
            SimpleIoc.Default.Register<MeterArchivesViewModel>();
            SimpleIoc.Default.Register<AddOrUpdateMeterInfoViewModel>();
            SimpleIoc.Default.Register<RemoteUpgradeViewModel>();
            SimpleIoc.Default.Register<CrcCheckViewModel>();
            SimpleIoc.Default.Register<SpecialRecordViewModel>();
        }
        public MainViewModel MainViewModel 
        {
            get 
            { 
                return ServiceLocator.Current.GetInstance<MainViewModel>();
            } 
        }

        public CommViewModel CommViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<CommViewModel>();
            }
        }

        public ModeBitViewModel ModeBitViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<ModeBitViewModel>();
            }
        }

        public AppControlViewModel AppControlViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AppControlViewModel>();
            }
        }
        public CONNECTControlViewModel CONNECTControlViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<CONNECTControlViewModel>();
            }
        }
        public CommonControlViewModel CommonControlViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<CommonControlViewModel>();
            }
        }
        public FrameMessageInfoViewModel FrameMessageInfoViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<FrameMessageInfoViewModel>();
            }
        }
        public FrameShowViewModel FrameShowViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<FrameShowViewModel>();
            }
        }

        public RecordChoiceViewModel RecordChoiceViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<RecordChoiceViewModel>();
            }
        }

        public ReadRecordViewModel ReadRecordViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<ReadRecordViewModel>();
            }
        }

        public RSDViewModel RSDViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<RSDViewModel>();
            }
        }

        public ROADViewModel ROADViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<ROADViewModel>();
            }
        }
        public ProxyTransmitViewModel ProxyTransmitViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<ProxyTransmitViewModel>();
            }
        }
        public ProxyTransmitCommViewModel ProxyTransmitCommViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<ProxyTransmitCommViewModel>();
            }
        }
        public PlanSetViewModel PlanSetViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<PlanSetViewModel>();
            }
        }
        public AddCollectArViewModel AddCollectArViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddCollectArViewModel>();
            }
        }
        public AddCollectArExtendViewModel AddCollectArExtendViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddCollectArExtendViewModel>();
            }
        }
        public AddBatchConnectArViewModel AddBatchConnectArViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddBatchConnectArViewModel>();
            }
        }
        public AddOrUpdateJobViewModel AddOrUpdateJobViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateJobViewModel>();
            }
        }
        public MeterListViewModel MeterListViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<MeterListViewModel>();
            }
        }
        public AddOrUpdateConnectPlanViewModel AddOrUpdateConnectPlanViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateConnectPlanViewModel>();
            }
        }
        public AddOrUpdateEventViewModel AddOrUpdateEventViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateEventViewModel>();
            }
        }
        public PlanContentViewModel PlanContentViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<PlanContentViewModel>();
            }
        }
        public AddOrUpdateTransPlanViewModel AddOrUpdateTransPlanViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateTransPlanViewModel>();
            }
        }
        public PowerCtrlParamViewModel PowerCtrlParamViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<PowerCtrlParamViewModel>();
            }
        }
        public PortConfigViewModel PortConfigViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<PortConfigViewModel>();
            }
        }
        public StepPriceViewModel StepPriceViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<StepPriceViewModel>();
            }
        }
        public DayRateTotalViewModel DayRateTotalViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<DayRateTotalViewModel>();
            }
        }
        public EditPlanListViewModel EditPlanListViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<EditPlanListViewModel>();
            }
        }
        public AddOrUpdateReportViewModel AddOrUpdateReportViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateReportViewModel>();
            }
        }
        public MSDataModel MSDataModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<MSDataModel>();
            }
        }
        public TeminalParamterViewModel TeminalParamterViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<TeminalParamterViewModel>();
            }
        }
        public MeterArchivesViewModel MeterArchivesViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<MeterArchivesViewModel>();
            }
        }

        public AddOrUpdateMeterInfoViewModel AddOrUpdateMeterInfoViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<AddOrUpdateMeterInfoViewModel>();
            }
        }
        public RemoteUpgradeViewModel remoteUpgradeViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<RemoteUpgradeViewModel>();
            }
        }

        public CrcCheckViewModel CrcCheckViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<CrcCheckViewModel>();
            }
        }

        public SpecialRecordViewModel SpecialRecordViewModel
        {
            get
            {
                return ServiceLocator.Current.GetInstance<SpecialRecordViewModel>();
            }
        }
    }
}
